#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2018/12/11 0:19
# @Author  : lizhen
# @Site    : 
# @File    : cMatplot.py
# @Software: PyCharm
import numpy as np
import matplotlib.pyplot as plt


class MatplotDemo:
    def __init__(self):
        self.fig = plt.figure()  # 图像所在的基对象

    def _test_plot(self):
        """
        md = MatplotDemo()
        md._test_plot()
        """
        self.ax = self.fig.add_subplot(2, 2, 1)  # 2*2的图像，当前选中第1个
        plt.show()

        # 创建图像，指定行、列、共享x轴刻度、共享y轴刻度
        fig, axes = plt.subplots(2, 2, True, True)
        plt.show()


if __name__ == '__main__':
    md = MatplotDemo()
    md._test_plot()
